﻿using AntMovement.Core.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AntMovement.Core.Hardware
{
    public interface IAxis
    {
        /// <summary>
        /// 设置速度
        /// </summary>
        /// <returns></returns>
        string SetProfile();

        /// <summary>
        /// 移动
        /// </summary>
        /// <returns></returns>
        string Move(long dist, int dist_mode, int vel_mode);

        /// <summary>
        /// 连续运动
        /// </summary>
        /// <returns></returns>
        string ContinuousMotion(bool bl);
        /// <summary>
        /// 回原运动
        /// </summary>
        /// <returns></returns>
        string HomeMove();

        /// <summary>
        /// 停止 0 减速停止 1 立即停止
        /// </summary>
        /// <returns></returns>
        string Stop(int emgStop);

        /// <summary>
        /// 获取轴状态
        /// </summary>
        /// <returns></returns>
        AxisStatus GetAxisStatus();

        /// <summary>
        /// 获取轴参数
        /// </summary>
        /// <returns></returns>
        AxisParameter GetAxisParameter();
        /// <summary>
        /// 伺服使能
        /// </summary>
        /// <param name="enable"></param>
        /// <returns></returns>
        string SetServo(bool enable);
        /// <summary>
        /// 清除轴编码器位置
        /// </summary>
        /// <returns></returns>
        string ClearCEnc();
        /// <summary>
        /// 清除轴脉冲位置
        /// </summary>
        /// <returns></returns>
        string ClearCPos();
    }
}
